//
//  ViewController.m
//  使用AlertTool
//
//  Created by chenleping on 2018/9/13.
//  Copyright © 2018年 DSY. All rights reserved.
//

#import "ViewController.h"
#import "AlertTool.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    self.view.backgroundColor = [UIColor yellowColor];
}


- (IBAction)top:(id)sender {
    [AlertTool showTopWithText:@"显示在上面..."];
}
- (IBAction)center:(id)sender {
    [AlertTool showCenterWithText:@"显示在中间..."];
}
- (IBAction)bottom:(id)sender {
    [AlertTool showBottomWithText:@"显示在底部..."];
}
- (IBAction)alert:(id)sender {
    [AlertTool showAlertView:self title:@"这是标题" message:@"这是信息" cancelButtonTitle:@"取消" otherButtonTitle:@"确定" cancleHandler:^{
        NSLog(@"点击取消...");
    } otherHandler:^{
        NSLog(@"点击确定");
    }];
}
- (IBAction)actionSheet:(id)sender {
    [AlertTool showActionSheetWithTwoActionTitle:@"这是标题" message:@"这是信息" inViewController:self actionClicked:^{
        NSLog(@"...");
    } titles:@[@"标题1", @"标题2", @"标题3"]];
}


@end
